package lab_08.com.acme.task4;

public class Task4Arrays {
	public static void main(String[] args) {
		int n3=0, n7=0, n9 = 0; //number of elements counters
		int array[] = new int[] {3,7,3,9,9,3,7,3,9,7};
		
		for (int el: array) {
			switch (el) {
			case 3:
				n3++;
				break;
			case 7:
				n7++;
				break;
			case 9:
				n9++;
				break;
			}
		}
		
		System.out.format("Number of 3: %1$d\n",n3);
		System.out.format("Number of 7: %1$d\n",n7);
		System.out.format("Number of 9: %1$d",n9);
	}
}
